 /*
  * Copyright (c) 2021, 2023, yishun.cn All rights reserved.
  *
  */
 package cn;

 import cn.shun.config.SpringConfig;
 import cn.shun.entity.CustomIdGenerator;
 import cn.shun.entity.IdWorker;
 import cn.shun.entity.SnowflakeIdWorker;
 import org.junit.jupiter.api.DisplayName;
 import org.junit.jupiter.api.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.test.context.junit.jupiter.SpringJUnitConfig;

 /**
  * <p>Project: MyBatis2023 - IdWorkDemo
  * <p>Powered by yishun On 2023-01-30 21:20:25
  *
  * @author yishun [2465734101@qq.com]
  * @version 1.0
  * @since 17
  */
 @SpringJUnitConfig(SpringConfig.class)
 public class IdWorkDemo {
     @Autowired
     IdWorker idw;
     @Autowired
     SnowflakeIdWorker sfiw;

     @Test
     void t1() {
         System.out.println(sfiw.nextId());
         System.out.println(sfiw.nextId());
         System.out.println(sfiw.nextId());
         System.out.println("====================");
         System.out.println(idw.nextId());
         System.out.println(idw.nextId());
         System.out.println(idw.nextId());
     }

 }
